﻿<BaseControl:DataControl x:Class="jSLApp.Client.Forms.TopicDetail"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                         xmlns:BaseControl="clr-namespace:jSLCore.Client.Presentation.BaseControl;assembly=jSLCore.Client.Presentation" xmlns:j="clr-namespace:jSLCore.Client.Presentation.Controls;assembly=jSLCore.Client.Presentation" xmlns:tk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" xmlns:Forms="clr-namespace:jSLApp.Client.Forms" xmlns:jBinding="clr-namespace:jSLCore.Client.Presentation.jBinding;assembly=jSLCore.Client.Presentation" xmlns:Security="clr-namespace:jSLApp.Client.Security" xmlns:Converters="clr-namespace:jSLApp.Client.Converters" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <j:ImageGroupBox Header="Топик">
        <tk:DockPanel LastChildFill="True">
            <StackPanel Orientation="Vertical" tk:DockPanel.Dock="Top">
                <Forms:SubscriptionToIt x:Name="subs"/>
                <TextBlock FontWeight="Bold" FontSize="14" Text="{Binding Header}"/>
                <j:LeftHeaderContainer Header="Автор:" ShareGroupName="1">
                    <HyperlinkButton Content="{Binding CreatorNameText}" Tag="{Binding Creator}" Click="gotoUser_Clicked"/>
                </j:LeftHeaderContainer>
                <j:LeftHeaderContainer Header="Дата публикации:" ShareGroupName="2">
                    <TextBlock>
                        <TextBlock.Text>
                            <jBinding:jBinding Path="CreationDate" ConvertingMode="ToShortDate" />
                        </TextBlock.Text>
                    </TextBlock>
                </j:LeftHeaderContainer>                
                <j:LeftHeaderContainer Header="Постоянная ссылка:">
                    <HyperlinkButton ToolTipService.ToolTip="Скопировать в буфер обмена" Click="copyLink_Clicked">
                        <HyperlinkButton.Content>
                            <Binding Path="id">
                                <Binding.Converter>
                                    <Converters:TopicIdToLinkConverter/>
                                </Binding.Converter>
                            </Binding>
                        </HyperlinkButton.Content>
                    </HyperlinkButton>
                </j:LeftHeaderContainer>
                <j:ImageButton Content="Удалить" Image="../Resources/delete.png" Click="deleteIt">
                    <BaseControl:BaseControl.jBinding>
                        <Security:SecurityBinding Permission="Users"/>
                    </BaseControl:BaseControl.jBinding>
                </j:ImageButton>
            </StackPanel>
            <Forms:CommentList x:Name="commentList" IsRatingVisible="False"/>
        </tk:DockPanel>
    </j:ImageGroupBox>
</BaseControl:DataControl>
